<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="ko" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>KAIST-CANSS Join</title>
<link href="design/mainframe.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.style1 {
	text-align: center;
	color: #FFFFFF;
	border-style: solid;
	border-width: 1px;
	padding: 1px 4px;
	background-color: #248CFC;
}
.style2 {
	border-style: solid;
	border-width: 1px;
}
img.button {
	cursor:pointer;
}
</style>
<script type="text/javascript" src="lib/httpobject.js"></script>

</head>

<body onload="getobj('div_basicform_apply').innerHTML=getobj('backup_div_basicform_apply').innerHTML;">

<!-- loading frame -->
<div id="overlay2" style="z-index: 150; position: absolute; width: 100%; display: none; height: 100%; top: 0px; left: 0px;">
	<center>
		<img alt="loadingImage" width="40" height="40" id="loadingImage" src="design/img/loading.gif" />
	</center>
</div>
<!-- loading frame -->


<form><input type="button" value="<< 이전 페이지" onclick="history.back();" /></form>
<h3 class="style1" style="width: 710px">가입 페이지입니다.</h3>
<div class="style2" style="width: 718px; height: 725px">
<form action="" method="post" style="height: 621px">
	<div id="div_basicform">
		<ol>
			<li>Role을 선택하세요.<ol>
				<li>
				<input checked="checked" id="_typecp" name="_persontype" type="radio" />Content 
				Provider: Syndication System에 Content의 공급을 목적으로 합니다.</li>
				<li>
				<input id="_typethirdparty" name="_persontype" type="radio" />3rd 
				Party user: Syndication System에 등록된 Content들을 이용할 수 있는 Key를 신청할 수 
				있습니다. 또한 이 Key를 이용하여 Content를 공급할 수 있는 기능을 제공받습니다.</li>
			</ol>
			</li>
			<li>사용할 ID 및 Password를 입력하세요.<ol>
				<li>ID: <input id="txt_id" style="width: 148px" type="text" 
							onchange="
								var str = this.value;
								var obj = document.getElementById('b_txt_id_error');
								if(str)
								{
									var regexp=/(?:^[\w]+)$/ig;
									var checked = regexp.test(str);
									if(checked)
										obj.style.visibility='hidden';
									else
										obj.style.visibility='visible';
								}
							"
						/> (숫자/영문) <b id="b_txt_id_error" style="visibility:hidden; color:red;">wrong input</b></li>
				<li>PW: <input id="txt_pw" type="text" 
							onchange="
								var str = this.value;
								var obj = document.getElementById('b_txt_pw_error');
								if(str)
								{
									var regexp=/(?:^[\w]{4,})$/ig;
									var checked = regexp.test(str);
									if(checked)
										obj.style.visibility='hidden';
									else
										obj.style.visibility='visible';
								}
							"
						/>(숫자/영문, 4글자 이상) <b id="b_txt_pw_error" style="visibility:hidden; color:red;">wrong input</b></li>
			</ol>
			</li>
		</ol>
		<center>
			<div id="div_basicform_apply">
			</div>
		</center>
	</div>
	<hr />
	<div id="div_basicform2"><!-- common -->
	</div>
	<div id="div_exform" style="display:none;"><!-- this is for 3rd party -->
		<div id="div_exform_biztype">
		</div>
		<div id="div_exform_buz_public">
		</div>
		<center>
			<div id="div_exform_apply">
			</div>
		</center>
	</div>
</form>

</div>


<!-- basicform apply button -->
<div id="backup_div_basicform_apply" style="display:none;">
	<img alt="bt_basicform_apply" height="23" name="bt_basicform_apply" src="design/img/bt_join.png" width="91"
		onmouseover="this.src='design/img/bt_join_over.png'" onmouseout="this.src='design/img/bt_join.png'" 
		onclick="
			var regexp=/(?:^[\w]+)$/ig;
			var regexp2=/(?:^[\w]{4,})$/ig;
			
			if(regexp.test(getobj('txt_id').value) && regexp2.test(getobj('txt_pw').value))
			{
				//passed
				getobj('b_bt_basicform_apply_error').style.visibility = 'hidden';
				//some ajax jobs
				//start
				getobj('div_basicform_apply').innerHTML=getobj('overlay2').innerHTML;
				
				getobj('div_basicform').disabled='disabled';
				getobj('txt_id').disabled='disabled';
				getobj('txt_pw').disabled='disabled';
				var typecp_checked = getobj('_typecp').checked;
				var typethirdparty_checked = getobj('_typethirdparty').checked;
				
				//
				//FIXME: ajax code
				var hobj = getHTTPObject();
				if(hobj==null)
				{
					getobj('b_bt_basicform_apply_error_ajax').style.visibility='visible';
					getobj('b_bt_basicform_apply_error_ajax').innerHTML='cannot open a connection to a server';
					return;
				}
				var param='_method=_step1&_type=';
				if(typecp_checked) param+='typecp';
				else if(typethirdparty_checked) param+='typethirdparty';
				else param+='null';
				param+='&_txt_id='+getobj('txt_id').value;
				param+='&_txt_pw='+getobj('txt_pw').value;
				hobj.open('POST','svtAjaxJoinProcess',true);
				hobj.setRequestHeader('Content-type','application/x-www-form-urlencoded');
				hobj.setRequestHeader('Content-length',param.length);
				hobj.setRequestHeader('Connection','close');
				hobj.onreadystatechange=function()
				{
					if(hobj.readyState==4 && hobj.status==200)
					{
						getobj('b_bt_basicform_apply_error_ajax').style.visibility='hidden';
						
						getobj('div_basicform_apply').innerHTML=hobj.responseText;
						
						if(hobj.responseText.indexOf('succeed:')>=0)
						{
							//than load next items
							getobj('div_basicform2').innerHTML=getobj('backup_div_basicform2').innerHTML;
							if(typecp_checked)//defined on top
							{
								getobj('div_basicform2_apply').innerHTML=getobj('backup_div_basicform2_apply').innerHTML;
								getobj('div_exform').style.display='none'
							}else if(typethirdparty_checked)
							{
								getobj('div_exform').style.display='block';
								getobj('div_exform_biztype').innerHTML=getobj('backup_div_exform_biztype').innerHTML;
								getobj('div_exform_apply').innerHTML=getobj('backup_div_exform_apply').innerHTML;
							}
						}else
						{//rollback
							getobj('div_basicform').disabled='';
							getobj('txt_id').disabled='';
							getobj('txt_pw').disabled='';
							getobj('div_basicform_apply').innerHTML=getobj('backup_div_basicform_apply').innerHTML;
							getobj('b_bt_basicform_apply_error').style.visibility = 'visible';
							getobj('b_bt_basicform_apply_error').innerHTML=hobj.responseText;
						}
					}else if(hobj.readyState==4)
					{
						getobj('b_bt_basicform_apply_error_ajax').style.visibility='visible';
						getobj('b_bt_basicform_apply_error_ajax').innerHTML='received, failed';
					}
				}
				hobj.send(param);
				return;
			}
			//error
			getobj('b_bt_basicform_apply_error').style.visibility = 'visible';
			getobj('b_bt_basicform_apply_error').innerHTML='please, correct errors';							
		"
	/><br/>
	<center>
		<b id="b_bt_basicform_apply_error" style="visibility:hidden; color:red">please, correct errors</b>
		<b id="b_bt_basicform_apply_error_ajax" style="visibility:hidden; color:red"></b>
	</center>
</div>
<!-- basicform2 apply button -->
<div id="backup_div_basicform2_apply" style="display:none">
	<img alt="bt_basicform2_apply" height="23" name="bt_basicform2_apply" src="design/img/bt_join.png" width="91"
		onmouseover="this.src='design/img/bt_join_over.png'" onmouseout="this.src='design/img/bt_join.png'" 
		onclick="
			var regexp1=/^(?:[\s\w\d가-힣]+)$/ig; //encoding problem, maybe?
			var regexp2=/^(?:\d{2,3})-(?:\d{3,4})-(?:\d{4})$/ig;
			var regexp3=/(?:^[\w]+)(?:@)(?:[\w]+)/ig;
			
			if( regexp1.test(getobj('txt_name').value) &&
				regexp2.test(getobj('txt_phone_1').value + '-' + getobj('txt_phone_2').value + '-' + getobj('txt_phone_3').value) &&
				regexp3.test(getobj('txt_email').value) )
			{
				//passed
				getobj('b_div_basicform2_error').style.visibility = 'hidden';
				//some ajax jobs
				//start
				getobj('div_basicform2_apply').innerHTML=getobj('overlay2').innerHTML;
				
				getobj('div_basicform2').disabled='disabled';
				getobj('txt_name').disabled='disabled';
				getobj('select_num').disabled='disabled';
				getobj('txt_phone_1').disabled='disabled';
				getobj('txt_phone_2').disabled='disabled';
				getobj('txt_phone_3').disabled='disabled';
				getobj('txt_email').disabled='disabled';
				var typecp_checked = getobj('_typecp').checked;
				var typethirdparty_checked = getobj('_typethirdparty').checked;
				//than load next page
				//
				//FIXME: ajax code
				var hobj = getHTTPObject();
				if(hobj==null)
				{
					getobj('b_div_basicform2_error_ajax').style.visibility='visible';
					getobj('b_div_basicform2_error_ajax').innerHTML='cannot open a connection to a server';
					return;
				}
				var param='_method=_step2&_type=';
				if(typecp_checked) param+='typecp';//addit
				else if(typethirdparty_checked) param+='typethirdparty';//addit
				else param+='null';//addit
				param+='&_txt_pw='+getobj('txt_pw').value;//addit
				param+='&_txt_id='+getobj('txt_id').value;
				param+='&_txt_name='+getobj('txt_name').value;
				param+='&_txt_phone='+getobj('txt_phone_1').value+'-'+getobj('txt_phone_2').value+'-'+getobj('txt_phone_3').value;
				param+='&_txt_email='+getobj('txt_email').value;
				hobj.open('POST','svtAjaxJoinProcess',true);
				hobj.setRequestHeader('Content-type','application/x-www-form-urlencoded');
				hobj.setRequestHeader('Content-length',param.length);
				hobj.setRequestHeader('Connection','close');
				hobj.onreadystatechange=function()
				{
					if(hobj.readyState==4 && hobj.status==200)
					{
						getobj('b_div_basicform2_error_ajax').style.visibility='hidden';
						
						getobj('div_basicform2_apply').innerHTML=hobj.responseText;
						
						if(hobj.responseText.indexOf('succeed:')>=0)
						{
							//than some login process
							//alert('it will be done');
							getobj('frm_dyn_id').value=getobj('txt_id').value;
							getobj('frm_dyn_pw').value=getobj('txt_pw').value;
							getobj('frm_dyn').submit();
						}else
						{//rollback
							getobj('div_basicform2').disabled='';
							getobj('txt_name').disabled='';
							getobj('select_num').disabled='';
							getobj('txt_phone_1').disabled='';
							getobj('txt_phone_2').disabled='';
							getobj('txt_phone_3').disabled='';
							getobj('txt_email').disabled='';
							getobj('div_basicform2_apply').innerHTML=getobj('backup_div_basicform2_apply').innerHTML;
							getobj('b_div_basicform2_error').innerHTML=hobj.responseText;
							getobj('b_div_basicform2_error').style.visibility = 'visible';
						}
					}else if(hobj.readyState==4)
					{
						getobj('b_div_basicform2_error_ajax').style.visibility='visible';
						getobj('b_div_basicform2_error_ajax').innerHTML='received, failed';
					}
				}
				hobj.send(param);
				return;
			}
			//error
			getobj('b_div_basicform2_error').style.visibility = 'visible';
			getobj('b_div_basicform2_error').innerHTML='please, correct errors';
		"
	/><br/>
	<center>
		<b id="b_div_basicform2_error" style="visibility:hidden; color:red"></b>
		<b id="b_div_basicform2_error_ajax" style="visibility:hidden; color:red"></b>
	</center>
</div>
<!-- exform apply button -->
<div id="backup_div_exform_apply" style="display:none">
	<img alt="bt_exform_apply" height="23" name="bt_exform_apply" src="design/img/bt_join.png" width="91"
		onmouseover="this.src='design/img/bt_join_over.png'" onmouseout="this.src='design/img/bt_join.png'" 
		onclick="
			//비교해서 해야함
			var typepersonal_checked = getobj('_typepersonal').checked;
			var typepublic_checked = getobj('_typepublic').checked;
			if(typepersonal_checked )
			{
				var regexp1=/^(?:[\s\w\d가-힣]+)$/ig; //encoding problem, maybe?
				var regexp2=/^(?:\d{2,3})-(?:\d{3,4})-(?:\d{4})$/ig;
				var regexp3=/(?:^[\w]+)(?:@)(?:[\w]+)/ig;
				if( regexp1.test(getobj('txt_name').value) &&
					regexp2.test(getobj('txt_phone_1').value + '-' + getobj('txt_phone_2').value + '-' + getobj('txt_phone_3').value) &&
					regexp3.test(getobj('txt_email').value) )
				{
					//passed
					getobj('b_div_exform_error').style.visibility = 'hidden';
					//some ajax jobs
					//start
					getobj('div_exform_apply').innerHTML=getobj('overlay2').innerHTML;
					
					getobj('div_basicform2').disabled='disabled';
					getobj('div_exform').disabled='disabled';
					getobj('txt_name').disabled='disabled';
					getobj('select_num').disabled='disabled';
					getobj('txt_phone_1').disabled='disabled';
					getobj('txt_phone_2').disabled='disabled';
					getobj('txt_phone_3').disabled='disabled';
					getobj('txt_email').disabled='disabled';
					//than load next page
					//
					//FIXME: ajax code
					var hobj = getHTTPObject();
					if(hobj==null)
					{
						getobj('b_div_exform_error_ajax').style.visibility='visible';
						getobj('b_div_exform_error_ajax').innerHTML='cannot open a connection to server';
						return;
					}
					var param='_method=_step3&_pub_buztype=typepersonal';
					param+='&_txt_pw='+getobj('txt_pw').value;//addit
					param+='&_txt_id='+getobj('txt_id').value;
					param+='&_txt_name='+getobj('txt_name').value;
					param+='&_txt_phone='+getobj('txt_phone_1').value+'-'+getobj('txt_phone_2').value+'-'+getobj('txt_phone_3').value;
					param+='&_txt_email='+getobj('txt_email').value;
					hobj.open('POST','svtAjaxJoinProcess',true);
					hobj.setRequestHeader('Content-type','application/x-www-form-urlencoded');
					hobj.setRequestHeader('Content-length',param.length);
					hobj.setRequestHeader('Connection','close');
					hobj.onreadystatechange=function()
					{
						if(hobj.readyState==4 && hobj.status==200)
						{
							getobj('b_div_exform_error_ajax').style.visibility='hidden';
						
							getobj('div_exform_apply').innerHTML=hobj.responseText;
							
							if(hobj.responseText.indexOf('succeed:')>=0)
							{
								//than some login process
								//alert('it will be done');
								getobj('frm_dyn_id').value=getobj('txt_id').value;
								getobj('frm_dyn_pw').value=getobj('txt_pw').value;
								getobj('frm_dyn').submit();
							}else
							{//rollback
								getobj('div_basicform2').disabled='';
								getobj('div_exform').disabled='';
								getobj('txt_name').disabled='';
								getobj('select_num').disabled='';
								getobj('txt_phone_1').disabled='';
								getobj('txt_phone_2').disabled='';
								getobj('txt_phone_3').disabled='';
								getobj('txt_email').disabled='';
								getobj('div_exform_apply').innerHTML=getobj('backup_div_exform_apply').innerHTML;
								getobj('b_div_exform_error').style.visibility = 'visible';
								getobj('b_div_exform_error').innerHTML=hobj.responseText;
							}
						}else if(hobj.readyState==4)
						{
							getobj('b_div_exform_error_ajax').style.visibility='visible';
							getobj('b_div_exform_error_ajax').innerHTML='received, failed';
						}
					}
					hobj.send(param);
					return;
				}
				//error
				getobj('b_div_exform_error').style.visibility = 'visible';
				getobj('b_div_exform_error').innerHTML='please, correct errors';
				
			}else if(typepublic_checked )
			{
				var regexp1=/^(?:[\s\w\d가-힣]+)$/ig; //encoding problem, maybe?
				var regexp2=/^(?:\d{2,3})-(?:\d{3,4})-(?:\d{4})$/ig;
				var regexp3=/(?:^[\w]+)(?:@)(?:[\w]+)/ig;
							
				if( regexp1.test(getobj('txt_name').value) &&
					regexp2.test(getobj('txt_phone_1').value + '-' + getobj('txt_phone_2').value + '-' + getobj('txt_phone_3').value) &&
					regexp3.test(getobj('txt_email').value) &&
					
					getobj('txt_pub_name').value.length>0 &&
					(getobj('txt_pub_regnum_1').value+'-'+getobj('txt_pub_regnum_2').value+'-'+getobj('txt_pub_regnum_3').value).length>0 &&
					getobj('txt_pub_category').value.length>0 &&
					getobj('txt_pub_people').value.length>0 &&
					getobj('txt_pub_money').value.length>0 &&
					getobj('txt_pub_year').value.length>0 &&
					getobj('txt_pub_ceo').value.length>0 &&
					getobj('txt_pub_ceo_phone').value.length>0 &&
					getobj('txt_pub_addr').value.length>0 )
					
				{
					//passed
					getobj('b_div_exform_error').style.visibility = 'hidden';
					//some ajax jobs
					//start
					getobj('div_exform_apply').innerHTML=getobj('overlay2').innerHTML;
					
					getobj('div_basicform2').disabled='disabled';
					getobj('div_exform').disabled='disabled';
					getobj('txt_name').disabled='disabled';
					getobj('select_num').disabled='disabled';
					getobj('txt_phone_1').disabled='disabled';
					getobj('txt_phone_2').disabled='disabled';
					getobj('txt_phone_3').disabled='disabled';
					getobj('txt_email').disabled='disabled';
					getobj('txt_pub_name').disabled='disabled';
					getobj('txt_pub_regnum_1').disabled='disabled';
					getobj('txt_pub_regnum_2').disabled='disabled';
					getobj('txt_pub_regnum_3').disabled='disabled';
					getobj('txt_pub_category').disabled='disabled';
					getobj('txt_pub_people').disabled='disabled';
					getobj('txt_pub_money').disabled='disabled';
					getobj('txt_pub_year').disabled='disabled';
					getobj('txt_pub_ceo').disabled='disabled';
					getobj('txt_pub_ceo_phone').disabled='disabled';
					getobj('txt_pub_addr').disabled='disabled';
					//than load next page
					//
					//FIXME: ajaxcode
					var hobj = getHTTPObject();
					if(hobj==null)
					{
						getobj('b_div_exform_error_ajax').style.visibility='visible';
						getobj('b_div_exform_error_ajax').innerHTML='cannot open a connection to server';
						return;
					}
					var param='_method=_step4&_pub_buztype=typepublic';
					param+='&_txt_pw='+getobj('txt_pw').value;//addit
					param+='&_txt_id='+getobj('txt_id').value;
					param+='&_txt_name='+getobj('txt_name').value;
					param+='&_txt_phone='+getobj('txt_phone_1').value+'-'+getobj('txt_phone_2').value+'-'+getobj('txt_phone_3').value;
					param+='&_txt_email='+getobj('txt_email').value;
					param+='&_txt_pub_name='+getobj('txt_pub_name').value;
					param+='&_txt_pub_regnum='+getobj('txt_pub_regnum_1').value+'-'+getobj('txt_pub_regnum_2').value+'-'+getobj('txt_pub_regnum_3').value;
					param+='&_txt_pub_category='+getobj('txt_pub_category').value;
					param+='&_txt_pub_people='+getobj('txt_pub_people').value;
					param+='&_txt_pub_money='+getobj('txt_pub_money').value;
					param+='&_txt_pub_year='+getobj('txt_pub_year').value;
					param+='&_txt_pub_ceo='+getobj('txt_pub_ceo').value;
					param+='&_txt_pub_ceo_phone='+getobj('txt_pub_ceo_phone').value;
					param+='&_txt_pub_addr='+getobj('txt_pub_addr').value;
					hobj.open('POST','svtAjaxJoinProcess',true);
					hobj.setRequestHeader('Content-type','application/x-www-form-urlencoded');
					hobj.setRequestHeader('Content-length',param.length);
					hobj.setRequestHeader('Connection','close');
					hobj.onreadystatechange=function()
					{
						if(hobj.readyState==4 && hobj.status==200)
						{
							getobj('b_div_exform_error_ajax').style.visibility='hidden';
						
							getobj('div_exform_apply').innerHTML=hobj.responseText;
							
							if(hobj.responseText.indexOf('succeed:')>=0)
							{
								//than some login process
								//alert('it will be done');
								getobj('frm_dyn_id').value=getobj('txt_id').value;
								getobj('frm_dyn_pw').value=getobj('txt_pw').value;
								getobj('frm_dyn').submit();
							}else
							{
								//rollback
								getobj('div_basicform2').disabled='';
								getobj('div_exform').disabled='';
								getobj('txt_name').disabled='';
								getobj('select_num').disabled='';
								getobj('txt_phone_1').disabled='';
								getobj('txt_phone_2').disabled='';
								getobj('txt_phone_3').disabled='';
								getobj('txt_email').disabled='';
								getobj('txt_pub_name').disabled='';
								getobj('txt_pub_regnum_1').disabled='';
								getobj('txt_pub_regnum_2').disabled='';
								getobj('txt_pub_regnum_3').disabled='';
								getobj('txt_pub_category').disabled='';
								getobj('txt_pub_people').disabled='';
								getobj('txt_pub_money').disabled='';
								getobj('txt_pub_year').disabled='';
								getobj('txt_pub_ceo').disabled='';
								getobj('txt_pub_ceo_phone').disabled='';
								getobj('txt_pub_addr').disabled='';
								getobj('div_exform_apply').innerHTML=getobj('backup_div_exform_apply').innerHTML;
								getobj('b_div_exform_error').style.visibility = 'visible';
								getobj('b_div_exform_error').innerHTML = hobj.responseText;
							}
						}else if(hobj.readyState==4)
						{
							getobj('b_div_exform_error_ajax').style.visibility='visible';
							getobj('b_div_exform_error_ajax').innerHTML='received, failed';
						}
					}
					hobj.send(param);
					return;
				}
				//error
				getobj('b_div_exform_error').style.visibility = 'visible';
				getobj('b_div_exform_error').innerHTML = 'please, correct errors';
			}

		"
	/><br/>
	<center>
		<b id="b_div_exform_error" style="visibility:hidden; color:red"></b>
		<b id="b_div_exform_error_ajax" style="visibility:hidden; color:red"></b>
	</center>
</div>
<!-- basicform2 -->
<div id="backup_div_basicform2" style="display:none">
	<ol>
		<li>필수적인 정보를 입력받습니다.<ol>
			<li>이름: <input id="txt_name" type="text" 
				onchange="
					var regexp=/^(?:[\s\w\d가-힣]+)$/ig; //encoding problem, maybe?
					if( regexp.test(this.value) )
						getobj('b_txt_name_error').style.visibility='hidden';
					else
						getobj('b_txt_name_error').style.visibility='visible';
				"
			/> (한글/영문) <b id="b_txt_name_error" style="visibility:hidden; color:red">wrong input</b></li>
			<li>전화번호:
			<select id="select_num" style="width: 79px;"
				onchange="if(this.value=='000'){getobj('txt_phone_1').value='';getobj('txt_phone_1').disabled='';getobj('txt_phone_1').focus();}else if(this.value){getobj('txt_phone_1').value=this.value;getobj('txt_phone_1').disabled='disabled';}check_txt_phone();"
			>
			<option>선택</option>
			<option value="000">직접 입력</option>
			<option value="010">010</option>
			<option value="011">011</option>
			<option value="016">016</option>
			<option value="017">017</option>
			<option value="018">018</option>
			<option value="019">019</option>
			</select>
			<script type="text/javascript">
			function check_txt_phone()
			{
				var str = getobj('txt_phone_1').value + '-'
						+ getobj('txt_phone_2').value + '-'
						+ getobj('txt_phone_3').value;
				var regexp=/^(?:\d{2,3})-(?:\d{3,4})-(?:\d{4})$/ig;
				if(regexp.test(str))
					getobj('b_txt_phone_error').style.visibility='hidden';
				else
					getobj('b_txt_phone_error').style.visibility='visible';
			}
			</script>
			<input disabled="disabled" id="txt_phone_1" name="txt_phone_1" style="width: 34px" type="text" onchange="check_txt_phone();" />-<input id="txt_phone_2" name="txt_phone_2"  style="width: 50px" type="text" onchange="check_txt_phone();"/>-<input id="txt_phone_3" name="txt_phone_3" style="width: 50px" type="text" onchange="check_txt_phone();"/> 
			(연락 가능한 번호를 입력해주세요) <b id="b_txt_phone_error" style="visibility:hidden; color:red">wrong input</b></li>
			<li>이메일: <input name="txt_email" id="txt_email" style="width: 247px" type="text" 
							onchange="
								var str = this.value;
								if(str)
								{
									var regexp=/(?:^[\w]+)(?:@)(?:[\w]+)/ig;
									var checked = regexp.test(str);
									if(checked)
									{
										getobj('b_txt_email_error').style.visibility='hidden';
									}else
									{
										getobj('b_txt_email_error').style.visibility='visible';
									}
								}
							"
						/> 
			(연락 가능한 주소를 입력해주세요) <b id="b_txt_email_error" style="visibility:hidden; color:red;">wrong input</b></li>
		</ol>
		</li>
	</ol>
	<center>
		<div id="div_basicform2_apply">
		</div>
	</center>
</div>
<!-- exform_biztype -->
<div id="backup_div_exform_biztype" style="display:none">
	<ol>
		<li>사업자 형태를 선택해주세요<ol>
			<li>
			<input checked="checked" name="_buztype" type="radio" id="_typepersonal" 
				onclick="getobj('div_exform_buz_public').innerHTML='';"
			/>개인 
			사업자</li>
			<li><input name="_buztype" type="radio" id="_typepublic" 
				onclick="getobj('div_exform_buz_public').innerHTML=getobj('backup_div_exform_buz_public').innerHTML;"
			/>법인 
			사업자</li>
		</ol>
		</li>
	</ol>
</div>
<!-- exform_buz_public -->
<div id="backup_div_exform_buz_public" style="display:none">
	<script type="text/javascript">
	function check_div_exform_buz_public()
	{
		var _txt_pub_name = getobj('txt_pub_name').value;
		var _txt_pub_regnum= getobj('txt_pub_regnum_1').value+'-'+getobj('txt_pub_regnum_2').value+'-'+getobj('txt_pub_regnum_3').value;
		var _txt_pub_category= getobj('txt_pub_category').value;
		var _txt_pub_people= getobj('txt_pub_people').value;
		var _txt_pub_money= getobj('txt_pub_money').value;
		var _txt_pub_year= getobj('txt_pub_year').value;
		var _txt_pub_ceo= getobj('txt_pub_ceo').value;
		var _txt_pub_ceo_phone= getobj('txt_pub_ceo_phone').value;
		var _txt_pub_addr= getobj('txt_pub_addr').value;
		if( _txt_pub_name.length>0 &&
			_txt_pub_regnum.length>0 &&
			_txt_pub_category.length>0 &&
			_txt_pub_people.length>0 &&
			_txt_pub_money.length>0 &&
			_txt_pub_year.length>0 &&
			_txt_pub_ceo.length>0 &&
			_txt_pub_ceo_phone.length>0 &&
			_txt_pub_addr.length>0 )
			
		{
			getobj('b_div_exform_buz_public_error').style.visibility='hidden';
		}else
			getobj('b_div_exform_buz_public_error').style.visibility='visible';
						

	}
	</script>
	<ol>
		<li>모든 항목을 입력하셔야 등록이 가능합니다.
			<ol>
				<li>법인명&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input id="txt_pub_name" style="width: 133px" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
				사업자등록번호&nbsp;
				<input id="txt_pub_regnum_1" style="width: 67px" type="text" />-<input id="txt_pub_regnum_2" style="width: 67px" type="text" />-<input id="txt_pub_regnum_3" style="width: 67px" type="text" /></li>
				<li>업종&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input id="txt_pub_category" style="width: 132px" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
				종업원 수&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input id="txt_pub_people" style="width: 67px" type="text" />(명)</li>
				<li>자본금&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input id="txt_pub_money" style="width: 132px" type="text" />(천만원)&nbsp;&nbsp;&nbsp;&nbsp; 
				설립년도&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input id="txt_pub_year" style="width: 220px" type="text" /></li>
				<li>대표자 성명
				<input id="txt_pub_ceo" style="width: 130px" type="text" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
				대표전화번호&nbsp;&nbsp;&nbsp;&nbsp;
				<input id="txt_pub_ceo_phone" style="width: 220px" type="text" /></li>
				<li>회사 주소&nbsp;&nbsp;&nbsp;
				<input id="txt_pub_addr" style="width: 504px" type="text" /></li>
			</ol>
			<b id="b_div_exform_buz_public_error" style="visibility:hidden; color:red;">wrong input</b>
		</li>
	</ol>
</div>

<div style="display:none">
	<form id="frm_dyn" method="POST" action="svtLogin">
		<input type="hidden" id="frm_dyn_id" name="_pid" />
		<input type="hidden" id="frm_dyn_pw" name="_pw" />
		<input type="hidden" id="frm_dyn_rurl" name="_rurl" value="mainframe.jsp"/>
	</form>
</div>

</body>

</html>
